<?php

use think\facade\Route;
Route::group(function (){
    Route::rule('PageDetail','Page/detail');//自定义页面详情
    Route::rule('ArticleDetail','Article/detail');//文章详情
    Route::rule('AtlasDetail','Atlas/detail');//图册详情
    Route::group(function (){
        Route::rule('StaffCard','Staff/card');//首页数据
        
        Route::rule('StaffList','Staff/list');//公司员工列表
        
        Route::rule('StaffCardVisitor','Staff/visitor');//添加访问记录
        
        Route::rule('ShareQrCode','Staff/shareQrCode');//获取二维码
        
        Route::rule('Record','Record/add');//添加雷达记录
        
        Route::rule('AtlasList','Atlas/list');//图册列表
        
        Route::rule('ArticleList','Article/list');//文章列表
        
        Route::rule('StaffProfile','Staff/profile');//员工自定义介绍
        
        Route::rule('VisitorList','Visitor/list');//获取名片夹访问记录
        
        Route::rule('VisitorDelete','Visitor/delete');//删除名片夹记录
        
        Route::rule('getFirmKefu','Visitor/kefu');//获取客服
        
    })->middleware([\app\api\middleware\Check::class]);
    
    Route::group(function (){
        // 管理端
        Route::rule('ManageCardList','Manage/list');//获取我的名片列表
        Route::rule('ManageCardDetele','Manage/delete');//删除我的名片
        Route::rule('ManageCardBind','Manage/bind');//绑定
        
        Route::rule('ManageCardRecordData','ManageData/data');//获取名片数据
        Route::rule('ManageCardRecordList','ManageData/list');//获取名片访客记录
        Route::rule('ManageCardRecordNotesSave','ManageData/notesSave');//添加保存备注
        
        Route::rule('ManageStaffDetail','ManageStaff/detail');//获取员工信息
        Route::rule('ManageStaffSave','ManageStaff/save');//修改员工信息
        
        Route::rule('ManageFileQiniuToken','ManageFile/qiniuToken');//获取七牛token
        
        Route::rule('ManageFileUpload','ManageFile/upload');//上传资源
        
        Route::rule('ManageFileList','ManageFile/list');//获取资源库列表
        
        Route::rule('ManageFileSave','ManageFile/save');//资源新增修改
        
        Route::rule('ManageFileDelete','ManageFile/delete');//删除资源
        
    })->middleware([\app\api\middleware\ManageCheck::class]);
    
})->middleware([\app\api\middleware\Base::class]);
Route::rule('preload','preload/index');//数据预加载
Route::rule('getOfficiaConfig','official/getOfficiaConfig');//h5版获取微信分享配置
Route::miss(function() {
    return '404！您访问的地址不存在！';
});